package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysTenantBacklogMapper;
import com.ruoyi.system.domain.SysTenantBacklog;
import com.ruoyi.system.service.ISysTenantBacklogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 租户收租待办Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-20
 */
@Service
public class SysTenantBacklogServiceImpl implements ISysTenantBacklogService 
{
    @Autowired
    private SysTenantBacklogMapper sysTenantBacklogMapper;

    /**
     * 查询租户收租待办
     * 
     * @param backlogId 租户收租待办ID
     * @return 租户收租待办
     */
    @Override
    public SysTenantBacklog selectSysTenantBacklogById(Long backlogId)
    {
        return sysTenantBacklogMapper.selectSysTenantBacklogById(backlogId);
    }

    /**
     * 查询租户收租待办列表
     * 
     * @param sysTenantBacklog 租户收租待办
     * @return 租户收租待办
     */
    @Override
    public List<SysTenantBacklog> selectSysTenantBacklogList(SysTenantBacklog sysTenantBacklog)
    {
        return sysTenantBacklogMapper.selectSysTenantBacklogList(sysTenantBacklog);
    }

    @Override
    public List<SysTenantBacklog> selectSysTenantBacklogMonthList(SysTenantBacklog sysTenantBacklog) {
        return sysTenantBacklogMapper.selectSysTenantBacklogMonthList(sysTenantBacklog);
    }

    /**
     * 查询租户收租待办列表
     *
     * @param sysTenantBacklog 租户收租待办
     * @return 租户收租待办集合
     */
    @Override
    public List<SysTenantBacklog> selectSysTenantBacklogMergeList(SysTenantBacklog sysTenantBacklog) {
        return sysTenantBacklogMapper.selectSysTenantBacklogMergeList(sysTenantBacklog);
    }

    /**
     * 查询各楼栋收租统计
     */
    @Override
    public List<SysTenantBacklog> selectSysTenantBacklogStatList() {
        return sysTenantBacklogMapper.selectSysTenantBacklogStatList();
    }

    /**
     * 新增租户收租待办
     * 
     * @param sysTenantBacklog 租户收租待办
     * @return 结果
     */
    @Override
    public int insertSysTenantBacklog(SysTenantBacklog sysTenantBacklog)
    {
        sysTenantBacklog.setCreateTime(DateUtils.getNowDate());
        return sysTenantBacklogMapper.insertSysTenantBacklog(sysTenantBacklog);
    }

    /**
     * 修改租户收租待办
     * 
     * @param sysTenantBacklog 租户收租待办
     * @return 结果
     */
    @Override
    public int updateSysTenantBacklog(SysTenantBacklog sysTenantBacklog)
    {
        sysTenantBacklog.setUpdateTime(DateUtils.getNowDate());
        return sysTenantBacklogMapper.updateSysTenantBacklog(sysTenantBacklog);
    }

    /**
     * 删除租户收租待办对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysTenantBacklogByIds(String ids)
    {
        return sysTenantBacklogMapper.deleteSysTenantBacklogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除租户收租待办信息
     * 
     * @param backlogId 租户收租待办ID
     * @return 结果
     */
    @Override
    public int deleteSysTenantBacklogById(Long backlogId)
    {
        return sysTenantBacklogMapper.deleteSysTenantBacklogById(backlogId);
    }
}
